class SRKFShotgunFire extends KFShotgunFire;

/* simulated function bool AllowFire()
{
	//Log(SRKFWeapon(Weapon).bIsReloading@SRKFWeapon(Weapon).MagAmmoRemaining);
	if( SRKFWeapon(Weapon).bIsReloading && SRKFWeapon(Weapon).MagAmmoRemaining < 2)
		return false;
	if( SRKFWeaponShotgun(Weapon).MagAmmoRemaining<1 )
		return false;
	return Super(WeaponFire).AllowFire();
} */

simulated function bool AllowFire()
{
	if( SRKFWeapon(Weapon).bIsReloading && SRKFWeapon(Weapon).MagAmmoRemaining < 2)
		return false;

	if(KFPawn(Instigator).SecondaryItem!=none)
		return false;
	if( KFPawn(Instigator).bThrowingNade )
		return false;

	if( Level.TimeSeconds - LastClickTime>FireRate )
	{
		LastClickTime = Level.TimeSeconds;
	}

	if( SRKFWeaponShotgun(Weapon).MagAmmoRemaining<1 )
	{
    		return false;
	}

	return super(WeaponFire).AllowFire();
}
/* 
event ModeDoFire()
{
	local float Rec;

	if (!AllowFire())
		return;

	Spread = Default.Spread;
	Rec = 1;

	//Log("ShG Spread="$Spread);
	if ( KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo) != none && KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ClientVeteranSkill != none )
	{
		Spread *= KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ClientVeteranSkill.Static.ModifyRecoilSpread(KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo), self, Rec);
	}

	if( !bFiringDoesntAffectMovement )
	{
		if (FireRate > 0.25)
		{
			Instigator.Velocity.x *= 0.1;
			Instigator.Velocity.y *= 0.1;
		}
		else
		{
			Instigator.Velocity.x *= 0.5;
			Instigator.Velocity.y *= 0.5;
		}
	}

	Super.ModeDoFire();

    // client
    if (Instigator.IsLocallyControlled())
    {
        HandleRecoil(Rec);
    }
}
 */
// Handle setting new recoil
/* simulated function HandleRecoil(float Rec)
{
	local rotator NewRecoilRotation;
	local KFPlayerController KFPC;
	local KFPawn KFPwn;
	local float RecoilCoiff;

	if( Instigator != none )
	{
		KFPC = KFPlayerController(Instigator.Controller);
		KFPwn = KFPawn(Instigator);
	}

	if( KFPC == none || KFPwn == none )
		return;

	RecoilCoiff = 1;
	if(Instigator.bIsCrouched)
	{
		RecoilCoiff = 0.3;
	}
	if( !KFPC.bFreeCamera )
	{
		if( Weapon.GetFireMode(0).bIsFiring )
		{
			NewRecoilRotation.Pitch = RandRange( maxVerticalRecoilAngle * 0.5 , maxVerticalRecoilAngle );
			NewRecoilRotation.Yaw = RandRange( maxHorizontalRecoilAngle * 0.5 , maxHorizontalRecoilAngle );

			if( Rand( 2 ) == 1 )
				NewRecoilRotation.Yaw *= -1;

			NewRecoilRotation.Pitch += (VSize(Weapon.Owner.Velocity)* 3);
			NewRecoilRotation.Yaw += (VSize(Weapon.Owner.Velocity)* 3);
			NewRecoilRotation.Pitch += (Instigator.HealthMax / Instigator.Health * 5);
			NewRecoilRotation.Yaw += (Instigator.HealthMax / Instigator.Health * 5);
			NewRecoilRotation *= Rec * RecoilCoiff;

			KFPC.SetRecoil(NewRecoilRotation,RecoilRate * (default.FireRate/FireRate));
		} */
/*  		if( Weapon.GetFireMode(1).bIsFiring )
		{
			NewRecoilRotation.Pitch = RandRange( maxVerticalRecoilAngle * 0.5 * RecoilCoiff, maxVerticalRecoilAngle );
			NewRecoilRotation.Yaw = RandRange( maxHorizontalRecoilAngle * 0.5 * RecoilCoiff, maxHorizontalRecoilAngle );

			if( Rand( 2 ) == 1 )
				NewRecoilRotation.Yaw *= -1;

			NewRecoilRotation.Pitch += (VSize(Weapon.Owner.Velocity)* 3);
			NewRecoilRotation.Yaw += (VSize(Weapon.Owner.Velocity)* 3);
			NewRecoilRotation.Pitch += (Instigator.HealthMax / Instigator.Health * 5);
			NewRecoilRotation.Yaw += (Instigator.HealthMax / Instigator.Health * 5);
			NewRecoilRotation *= Rec * RecoilCoiff;

			KFPC.SetRecoil(NewRecoilRotation,RecoilRate * (default.FireRate/FireRate));
		}  */
/* 	}
}
 */

defaultproperties
{
}
